(function(){
	//严格模式
	'use strict';
	var cache = new YIUI.DocCache();
	var entryParasCache = new LRUCache(30);
	var reqMap = {};
	/**
	 * 重新加载配置对象
	 */
	YIUI.DocService.reloadMetaForm = function(metaFormKeys){
		var formKeys = metaFormKeys.split(",");
		for (var i = formKeys.length -1; i >= 0; i--){
			//this.removeCache(formKeys[i]);
			YIUI.DocService.removeCache(formKeys[i]);
		}
		var params = {
				cmd: "ReloadForm",
				service:"RichDocument",
				formKeys:metaFormKeys
		}
		return new Svr.Request().getData(params);
	};
	YIUI.DocService.removeCache = function(formKey){
		if(!formKey){
			return;
		}
		var ret = entryParasCache.get(formKey);
		var cacheKeys = [],cacheKey;
		if(ret != null){
			for (var i = ret.length -1;i >= 0;i--){
				cacheKey = formKey + (ret[i]?"_"+ret[i]:"");
				cacheKeys.push(cacheKey);
			}
		}else{
			cacheKeys.push(formKey);
		}
		for(var i= cacheKeys.length-1;i>=0;i--){
			cacheKey = cacheKeys[i];
			cache.put(cacheKey,null);
			entryParasCache.del(formKey);
			delete reqMap[cacheKey];
		}
	};
})();